﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="reservations.aspx.vb" Inherits="Project2.reserve" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../Assignment/airportStyles.css" />
    <style type="text/css">
    </style>
    <script type="text/javascript">

        function getData() {
            acct = document.getElementById("txtAcctID").value;
            if (isNaN(acct)) {
                alert("Please enter Account ID. Note: ONLY INTEGERS YOU BOOB")
                return false;
            }
            else {
                return true;
            }
        }
    </script>
</head>

<body>

    <div id="header"></div>
    
    <div id="outLeftCol"></div>

    <div id="inLeftCol">
  
        <div id="leftMenu">
            <center>
            <h2 style="font-size:x-larger; text-decoration: underline; ">~~Navigation~~</h2>
            <a href="customer.aspx" style="font-size: large"  >Customers</a><br /><br />
            <a href="flights.aspx" style="font-size: large"  >Flights</a><br /><br />
            <a href="search.aspx" style="font-size: large"  >Search Airports</a><br /><br />
            <a href="reservations.aspx" style="font-size: large"  >Reservations</a><br /><br />
            </center>
        </div>
    </div>

    <div id="centerContent">
    <form id="form5" runat="server">
   <div id="contentArea">

   <asp:Label ID="lblAcctID" Text="Account ID: " runat="server"></asp:Label> &nbsp
   <asp:TextBox ID="txtAcctID" runat="server"></asp:TextBox> &nbsp &nbsp
   <asp:Label ID="lblOrigin" Text="Origin: " runat="server"></asp:Label> &nbsp
   <asp:DropDownList ID="ddlOrigin" runat="server"></asp:DropDownList>&nbsp &nbsp
   <asp:Label ID="lblDest" Text="Dest.: " runat="server"></asp:Label>
   <asp:DropDownList ID="ddlDest" runat="server" ></asp:DropDownList> &nbsp &nbsp &nbsp
   <asp:Button ID="btnSubmit" runat="server" text="Submit" OnClientClick="return getData();"/><br /><br />
   <asp:Label ID="lblResInfo" Visible="false" runat="server" Text="Enter the seat number (1-300) of any flight you would like to reserve and select 'Accept Reservations'"></asp:Label><br />
   <asp:GridView ID="gvReserv" runat="server" AutoGenerateColumns="False" 
           Width="729px">
       <Columns>
           <asp:BoundField DataField="CustomerName" HeaderText="Name" />
           <asp:BoundField DataField="OriginCode" HeaderText="Origin" />
           <asp:BoundField DataField="DestinationCode" HeaderText="Dest." />
           <asp:BoundField DataField="DepartureTime" HeaderText="Departure" />
           <asp:BoundField DataField="FlightNumber" HeaderText="Flight #" />
           <asp:BoundField DataField="SeatsAvailable" HeaderText="Seats" />
           <asp:TemplateField HeaderText="Available?">
            <ItemTemplate>
                <asp:Label ID="lblSeatsAvail" runat="server"></asp:Label>
            </ItemTemplate>
            </asp:TemplateField>
           <asp:TemplateField HeaderText="Seat Number">
            <ItemTemplate>
                <asp:TextBox ID="txtSeatNum" runat="server" width="75px" Text="" onfocus="this.value=''"></asp:TextBox>
            </ItemTemplate>
            </asp:TemplateField>
       </Columns>
       </asp:GridView>
       <br />
       <asp:Button ID="btnAcptRes" Text="Accept Reservations" runat="server" visible="false"/>
   </div>
   </form>
    </div>
    <div id="inRightCol"></div>
    <div id="outRightCol"></div>
    <div id="footer"></div>

</body>
</html>
